<template>
  <div class="loading">
    <div class="loading-content">
      <img style="width: 1.1rem; height: 1.1rem" src="./loading.gif">
      <p class="desc">{{title}}</p>
    </div>
  </div>
</template>

<script>
export default {
  name: 'loading',
  data () {
    return {
      title: '加载中...'
    }
  },
  methods: {
    setTitle (title) {
      this.title = title
    }
  }
}
</script>

<style lang="scss" scoped>
  .loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    .loading-content {
      text-align: center;
      .desc {
        line-height: .8529rem;
        font-size: $font-size-small;
        color: $color-text-l;
      }
    }
  }
</style>
